import { ApiProperty } from '@nestjs/swagger';
import { RoleType } from '../constants/role.constant';

class GetRoleListAdminResDtoGuard {
  @ApiProperty({ description: '权限uuid' })
  readonly uuid: string;

  @ApiProperty({ description: '权限名称' })
  readonly name: string;
}

export class GetRoleListAdminResDto {
  @ApiProperty({ description: '用户角色uuid' })
  readonly uuid: string;

  @ApiProperty({ description: '用户角色名称' })
  readonly name: string;

  @ApiProperty({ description: '用户角色描述' })
  readonly description: string;

  @ApiProperty({ enum: RoleType, description: '用户角色类型' })
  readonly type: RoleType;

  @ApiProperty({ type: GetRoleListAdminResDtoGuard, isArray: true, description: '角色用户权限列表' })
  readonly guard_list: GetRoleListAdminResDtoGuard[];
}
